home *** CD-ROM | disk | FTP | other *** search
/ 3D GFX / 3D GFX.iso / pcutils / os2 / apple / source / apple.ipf < prev    next >
Encoding:
Text File  |  1995-12-31  |  2.4 KB  |  66 lines

  1. .********************************************************
  2. :userdoc.
  3. :docprof toc=123.
  4. :title.Apple Set for OS/2 PM
  5. .******************************************
  6. :h1 res=100.  Information
  7. :p.
  8. The apple set is a fractal in the complex plane, generated by the following
  9. iteration
  10. :xmp.    z_0=c, z_{n+1}=z_{n}^2+c.
  11. :exmp.
  12. :artwork align=left name='apple.bmp'.
  13. The point c belongs to the apple set, if the above defined sequence is 
  14. bounded. This program draws the apple set and lets the user magnify
  15. with a rubber band. As a criterion, we use
  16. :xmp.   |z_n| >= 16.
  17. :exmp.:p.
  18. If this happens for n<=N, then we assume that c is not in the apple set.
  19. The number of iterations N can be adjusted in a dialog. Since points close
  20. to the apple set will have a small n, where the iterations stops, this
  21. stopping n is used to color the point. By the way, the color is connected 
  22. to the potential of the apple set at c.
  23. :artwork align=left name='apple1.bmp'.
  24. The program will determine the color for any pixel of the window. A black 
  25. color means that the point belongs to the apple set.
  26. :p.
  27. Further Information&colon.
  28. :ul compact.
  29. :li. :link reftype=hd res=200.About the Author:elink.
  30. :li. :link reftype=hd res=300.Implementation Remarks:elink.
  31. :eul.
  32. .*******************************************
  33. :h1 res=200. About the Author
  34. :p.
  35. The main purpose of the program was to gain knowledge about PM programming.
  36. Programming has been done in C++ using an own class library. The source is 
  37. included.
  38. :p.
  39. For suggestions, write to
  40. :xmp.
  41.     Dr. R. Grothmann
  42.     Kath. Univ. Eichstätt
  43.     85072 Eichstätt
  44.     Germany
  45.  
  46.     EMail: rene.grothmann@ku-eichstaett.de
  47. :exmp.:p.
  48. .********************************************
  49. :h1 res=300. Implemation Remarks
  50. :p.
  51. There are several ways to implement a long painting job like this one.
  52. :p.
  53. (1) Direct painting to the screen. Then the screen would have to be 
  54. updated on any redraw message. This is out of discussion.
  55. :p.
  56. (2) Use of a bitmap. Simultaneously draw to the bitmap and the screen.
  57. This locks the screen for the time of the drawing.
  58. :p.
  59. (3) The Bitmap is drawn in a separate thread and updates the screen 
  60. every now and then. That is the approach of this little program.
  61. :p.
  62. I used an own class library. It contains just enough to get through
  63. with this job. I hope to have the time to extend it in the future.
  64. .********************************************
  65. :euserdoc.
  66.